<template>
    <eui-base-card v-for="item in PropsData.data" :key="item.c_guid" :title="item.c_cname" titleLine>
		
		<view class="goods-detail-view flex-row">
			<view  class="row-item" v-for="(itemLst, index) in item.lstChild" :key="index">
				<text class="item-deta" @click="GetKnowInfo(itemLst)">{{ itemLst.c_cname }}</text>
				<eui-tag 
					:text="itemLst.c_doc_count"
					plainFill
					plain
					:bgColor="themeBgColor" 
					:borderColor="themeBgColor" 
					:color="themeColor"
					shape="circle" 	
					@click="GetKnowInfo(itemLst)"	
				></eui-tag>
			</view>			
        </view>		
 	</eui-base-card>
</template>
<script setup lang="ts">
	import service from '@/common/service';
	import { ref, defineProps } from 'vue';
	import { useThemeStore } from '@/store/themeStore';
	import { storeToRefs } from 'pinia';
	const themeStore = useThemeStore(); // 主题
	const { theme } = storeToRefs(themeStore);
	const themeBgColor = ref(themeStore.theme == 'theme-blue' ? 'rgba(224, 239, 255, 0.5)' : 'rgba(255, 239, 224, 0.5)')
	const themeColor = ref(themeStore.theme == 'theme-blue' ? '#02B7E6' : '#FF6430')

 	const PropsData = defineProps<{ data: Array<File> }>();

 	const  GetKnowInfo= e =>{
		uni.navigateTo({
			url: './KnowledgeAllInfo?code=' + e.c_ccode+ '&c_name=' + e.c_cname
		});
	}
  
</script>
  
<style lang="scss" scoped>
.e-card__body {
	display: flex;
}
.goods-detail-view {
	margin-top: 24rpx;
  	flex-wrap: wrap;
}
.row-item {
	display: flex;
	padding-bottom: 28rpx;
	width: 50%;
	font-family: PingFangSC, PingFang SC;
	font-weight: 400;
	font-size: 28rpx;
	color: #666666;
	line-height: 40rpx;
	box-sizing: border-box;
	&:nth-child(odd) {  // 对于奇数项
		border-right: 1px solid #EEEEEE;  // 设置灰色边框
		::v-deep .u-tag {
			margin-right: 24rpx;
		}
	}
	&:nth-child(even) {  // 对于奇数项
		padding-left: 28rpx;  // 设置灰色边框
	}
	&:nth-last-child(1),
	&:nth-last-child(2) {
		padding-bottom: 0;
	}
	.item-deta {
		flex: 1;
		width: 0;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		font-size: 28rpx;
		color: #666666;
	}
}
</style>